import { createApp } from "vue";
import { createPinia } from "pinia";

import App from "@/App.vue";
import router from "./router";

import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
import "@/styles/index.scss";
//引入全局样式,用以清除默认样式
import pinia from "./store";

//配置element-plus的国际化
import { zhCn } from "element-plus/es/locales.mjs";

const app = createApp(App);

app.use(createPinia());
app.use(router);
app.use(
  ElementPlus,
  {
    locale: zhCn,
  },
  //配置element-plus的国际化
);

//svg插件需要的配置代码
import "virtual:svg-icons-register";

// //全局注册svg-icon组件
// import SvgIcon from "@/components/SvgIcon/index.vue";
// app.component("Svg-icon", SvgIcon);

//引入自定义插件对象：注册全局组件
import globalComponent from "@/components";
//安装自定义插件
app.use(globalComponent);
//安装pinia仓库
app.use(pinia);

app.mount("#app");
